﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MicropleSoft.WmsServiceLibrary.Domain;

namespace MicropleSoft.Web
{
    public partial class ServiceFacade
    {
        #region BaseDataAndService

        public List<BillingEntity> GetBillingEntityList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateBillingEntityService().Query(condition);
        }


        public void SaveBillingEntitys(List<BillingEntity> billingEntitys)
        {
            this.CreateAbstractServiceFactory().CreateBillingEntityService().Save(billingEntitys.ToList<IBillingEntity>());
        }

        public void SaveBillingEntitys(List<BillingEntity> billingEntitys, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateBillingEntityService().Save(billingEntitys.ToList<IBillingEntity>(), notUpdateProperties);
        }

        public List<Carrier> GetCarrierList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateCarrierService().Query(condition);
        }


        public void SaveCarriers(List<Carrier> carriers)
        {
            this.CreateAbstractServiceFactory().CreateCarrierService().Save(carriers.ToList<ICarrier>());
        }

        public void SaveCarriers(List<Carrier> carriers, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateCarrierService().Save(carriers.ToList<ICarrier>(), notUpdateProperties);
        }

        public List<Customer> GetCustomerList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateCustomerService().Query(condition);
        }


        public void SaveCustomers(List<Customer> customers)
        {
            this.CreateAbstractServiceFactory().CreateCustomerService().Save(customers.ToList<ICustomer>());
        }

        public void SaveCustomers(List<Customer> customers, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateCustomerService().Save(customers.ToList<ICustomer>(), notUpdateProperties);
        }

        public List<Owner> GetOwnerList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateOwnerService().Query(condition);
        }


        public void SaveOwners(List<Owner> owners)
        {
            this.CreateAbstractServiceFactory().CreateOwnerService().Save(owners.ToList<IOwner>());
        }

        public void SaveOwners(List<Owner> owners, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateOwnerService().Save(owners.ToList<IOwner>(), notUpdateProperties);
        }

        public List<Vendor> GetVendorList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateVendorService().Query(condition);
        }


        public void SaveVendors(List<Vendor> vendors)
        {
            this.CreateAbstractServiceFactory().CreateVendorService().Save(vendors.ToList<IVendor>());
        }

        public void SaveVendors(List<Vendor> vendors, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateVendorService().Save(vendors.ToList<IVendor>(), notUpdateProperties);
        }


        public List<Pack> GetPackList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreatePackService().Query(condition);
        }

        public void SavePacks(List<Pack> packs)
        {
            this.CreateAbstractServiceFactory().CreatePackService().Save(packs.ToList<IPack>());
        }

        public List<Organization> GetOrganizationList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateOrganizationService().Query(condition);
        }

        public void SaveOrganizations(List<Organization> organizations)
        {
            this.CreateAbstractServiceFactory().CreateOrganizationService().Save(organizations.ToList<IOrganization>());
        }

        public List<BillClass> GetBillClassList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateBillClassService().Query(condition);
        }
        
        public void SaveBillClasss(List<BillClass> billClasss)
        {
            this.CreateAbstractServiceFactory().CreateBillClassService().Save(billClasss.ToList<IBillClass>());
        }

        public void SaveBillClasss(List<BillClass> billClasss, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateBillClassService().Save(billClasss.ToList<IBillClass>(), notUpdateProperties);
        }

        public List<BillTemplate> GetBillTemplateList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateBillTemplateService().Query(condition);
        }

        public void SaveBillTemplates(List<BillTemplate> billTemplates)
        {
            this.CreateAbstractServiceFactory().CreateBillTemplateService().Save(billTemplates.ToList<IBillTemplate>());
        }

        public void SaveBillTemplates(List<BillTemplate> billTemplates, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateBillTemplateService().Save(billTemplates.ToList<IBillTemplate>(), notUpdateProperties);
        }

        public List<BillTemplateEntry> GetBillTemplateEntryList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateBillTemplateEntryService().Query(condition);
        }

        public void SaveBillTemplateEntrys(List<BillTemplateEntry> billTemplateEntrys)
        {
            this.CreateAbstractServiceFactory().CreateBillTemplateEntryService().Save(billTemplateEntrys.ToList<IBillTemplateEntry>());
        }

        public void SaveBillTemplateEntrys(List<BillTemplateEntry> billTemplateEntrys, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateBillTemplateEntryService().Save(billTemplateEntrys.ToList<IBillTemplateEntry>(), notUpdateProperties);
        }

        public List<ItemClass> GetItemClassList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateItemClassService().Query(condition);
        }

        public void SaveItemClasss(List<ItemClass> itemClasss)
        {
            this.CreateAbstractServiceFactory().CreateItemClassService().Save(itemClasss.ToList<IItemClass>());
        }

        public void SaveItemClasss(List<ItemClass> itemClasss, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateItemClassService().Save(itemClasss.ToList<IItemClass>(), notUpdateProperties);
        }

        public List<ItemTemplate> GetItemTemplateList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateItemTemplateService().Query(condition);
        }

        public void SaveItemTemplates(List<ItemTemplate> itemTemplates)
        {
            this.CreateAbstractServiceFactory().CreateItemTemplateService().Save(itemTemplates.ToList<IItemTemplate>());
        }

        public void SaveItemTemplates(List<ItemTemplate> itemTemplates, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateItemTemplateService().Save(itemTemplates.ToList<IItemTemplate>(), notUpdateProperties);
        }

        public List<ItemNode> GetItemNodeList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateItemNodeService().Query(condition);
        }

        public void SaveItemNodes(List<ItemNode> itemNodes)
        {
            this.CreateAbstractServiceFactory().CreateItemNodeService().Save(itemNodes.ToList<IItemNode>());
        }

        public void SaveItemNodes(List<ItemNode> itemNodes, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateItemNodeService().Save(itemNodes.ToList<IItemNode>(), notUpdateProperties);
        }

        public List<ItemClassKind> GetItemClassKindList(string condition)
        {
            return this.CreateAbstractServiceFactory().CreateItemClassKindService().Query(condition);
        }

        public void SaveItemClassKinds(List<ItemClassKind> itemClassKinds)
        {
            this.CreateAbstractServiceFactory().CreateItemClassKindService().Save(itemClassKinds.ToList<IItemClassKind>());
        }

        public void SaveItemClassKinds(List<ItemClassKind> itemClassKinds, List<String> notUpdateProperties)
        {
            this.CreateAbstractServiceFactory().CreateItemClassKindService().Save(itemClassKinds.ToList<IItemClassKind>(), notUpdateProperties);
        }

        #endregion
    }
}